package Atop100.huawei;

import java.util.Scanner;

public class Main2 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m = scanner.nextInt();
        int n = scanner.nextInt();
        int[][] board = new int[m][n];
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                board[i][j]=scanner.nextInt();
            }
        }
//        for (int i = 0; i <m; i++) {
//            for (int j = 0; j < n; j++) {
//                System.out.println(board[i][j]);
//
//            }
//        }
    }
    public  int find(int[][] board){
        int min=Integer.MAX_VALUE;
        int len1= board.length;
        int len2 = board[0].length;
        int[][] dp = new int[len1][len2];
        for (int i = 0; i < len1; i++) {
//            dp[i][0]==0?0:
        }


        return  min;
    }




}
